Memory system and method of controlling nonvolatile memory

ABSTRACT

According to one embodiment, a controller executes first refreshing in a case where a first value of a first block is larger than a first threshold and less than a second threshold. The first refreshing includes reprogramming a plurality of second memory cells among a plurality of first memory cells included in the first block.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.15/065,110, filed on Mar. 9, 2016 and claims the benefit of priorityfrom U.S. Provisional Application No. 62/216,826, filed on Sep. 10,2015; the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a memory systemincluding a nonvolatile memory and a method of controlling a nonvolatilememory.

BACKGROUND

In a storage device including a semiconductor memory such as a NANDflash memory, a refreshing process for rewriting data is executed. Insuch a refreshing process, data stored in a block that is a movementsource is moved to an erased block that is a movement destination.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram that illustrates the internalconfiguration of a memory system;

FIG. 2 is a diagram that illustrates the internal configuration of aNAND flash memory;

FIG. 3 is a diagram that illustrates an example of the configuration ofa block of a memory cell array having a two-dimensional structure;

FIG. 4 is a diagram that illustrates an example of the configuration ofa block of a memory cell array having a three-dimensional structure;

FIG. 5 is a cross-sectional view of a partial area of a memory cellarray of a NAND memory having a three-dimensional structure;

FIG. 6 is a diagram that illustrates distributions of threshold voltagesin a four-value data storage system;

FIG. 7 is a diagram that illustrates a distribution of thresholdvoltages that is changed due to various error factors;

FIG. 8 is a flowchart that illustrates a refreshing process;

FIG. 9 is a flowchart that illustrates another example of the refreshingprocess.

FIG. 10 is a diagram that illustrates a change in the number of errorbits with respect to time in a case where refreshing is executed using atechnique according to an embodiment and a change in the number of errorbits with respect to time in a case where refreshing is executed using atechnique of a comparative example;

FIG. 11 is a flowchart that illustrates an example of an overwriterefreshing process; and

FIG. 12 is a flowchart that illustrates another example of the overwriterefreshing process.

DETAILED DESCRIPTION

According to one embodiment, a memory system includes a nonvolatilememory and a controller. The nonvolatile memory includes a plurality ofblocks. The block includes a plurality of memory cells. In a case wherea first value of a first block is larger than a first threshold and lessthan a second threshold, the controller executes first refreshing. Thefirst refreshing includes reprogramming a plurality of second memorycells among a plurality of first memory cells included in the firstblock. The second threshold is larger than the first threshold. In acase where the first value of the first block is larger than the secondthreshold, the controller executes second refreshing. The secondrefreshing includes moving data of the first block to a second blockthat is different from the first block.

Exemplary embodiments of memory system and a method of controlling anonvolatile memory will be explained below in detail with reference tothe accompanying drawings. The present invention is not limited to thefollowing embodiments.

First Embodiment

FIG. 1 is a block diagram that illustrates an example of theconfiguration of a memory system 100 according to a first embodiment.The memory system 100 is connected to a host apparatus (hereinafter,abbreviated as a host) through a communication line 2 and functions asan external storage device of the host 1. The host 1, for example, maybe an information processing apparatus such as a personal computer, amobile phone, or an imaging apparatus, may be a mobile terminal such asa tablet computer or a smart phone, a gaming device, or an in-vehicleterminal such as a car navigation system.

The memory system 100 includes: a NAND flash memory (hereinafter,abbreviated as a NAND memory) 10 as a nonvolatile memory; and a memorycontroller 5. The nonvolatile memory device is not limited to the NANDflash memory but may be a flash memory having a three-dimensionalstructure, a resistance random access memory (ReRAM), a ferroelectricrandom access memory (FeRAM), or the like.

The NAND 10 includes one or more memory chips each including a memorycell array. The memory cell array includes a plurality of memory cellsarranged in a matrix pattern. The memory cell array includes a pluralityof blocks that are units for data erasing. Each block is configured by aplurality of memory cell groups MG (see FIGS. 3 and 4).

FIG. 2 is a diagram that illustrates an example of the internalconfiguration of a memory chip of the NAND 10. As illustrated in FIG. 2,the memory chip of the NAND 10 includes: a NAND I/O interface 11; a NANDcontrol unit 12; a memory cell array (NAND memory cell array) 13; a rowdecoder 14; a sense amplifier 15; a page buffer 16; and a column decoder17. The row decoder 14, the sense amplifier 15, the page buffer 16; andthe column decoder 17 configure a peripheral circuit. The peripheralcircuit makes an access (reading, programming, or erasing) to the memorycell array 13 under the control of the NAND control unit 12.

The NAND I/O interface 11 controls input/output of data to/from externaldevices such as the memory controller 5 and the like and, in a casewhere a command such as a write request or a read request is input,inputs the command to the NAND control unit 12. The NAND control unit 12controls the operation of the NAND 10 based on a command or the likeinput from the NAND I/O interface 11. More specifically, in a case wherea write request is input, the NAND control unit 12 executes control suchthat data requested to be written is written into a specified area ofthe memory cell array 13. On the other hand, in a case where a readrequest is input, the NAND control unit 12 executes control such thatdata requested to be read is read from the memory cell array 13. Thedata read from the memory cell array 13 is stored in the page buffer 16.The NAND control unit 12 outputs the data stored in the page buffer 16to the memory controller 5.

The memory cell array 13 that is the premise of this embodiment is notparticularly limited to a specific configuration but may be a memorycell array having a two-dimensional structure as illustrated in FIG. 3or a memory cell array having a three-dimensional structure asillustrated in FIGS. 4 and 5 or may employ any other configuration.

FIG. 3 is a diagram that illustrates an example of the configuration ofa block of the memory cell array having a two-dimensional structure.FIG. 3 illustrates one of a plurality of blocks that configure thememory cell array having the two-dimensional structure. The other blocksof the memory cell array have the same configuration as that illustratedin FIG. 3. As illustrated in FIG. 3, the block BLK of the memory cellarray includes (m+1) (here, m is an integer of 0 or more) NAND stringsNS. Each NAND string NS shares a diffusion region (a source region or adrain region) between memory cell transistors MT adjacent to each other.Each NAND string NS includes: (n+1) (here, n is an integer of 0 or more)memory cell transistors MT0 to MTn connected in series; and selectiontransistors ST1 and ST2 arranged at both ends of the column of the (n+1)memory cell transistors MT0 to MTn.

Word lines WL0 to WLn are respectively connected to control gateelectrodes of the memory cell transistors MT0 to MTn that configure theNAND string NS, and, memory cell transistors MTi (here, i=0 to n)included in each NAND string NS are connected to be common using thesame word line WLi (here, i=0 to n). In other words, the control gateelectrodes of the memory cell transistors MTi disposed in the same rowwithin the block BLK are connected to the same word line WLi.

Each of the memory cell transistors MT0 to MTn is configured by a fieldeffect transistor having a stacked gate structure on a semiconductorsubstrate. Here, the stacked gate structure includes: a charge storagelayer (floating gate electrode) formed on the semiconductor substratewith a gate insulating film being interposed therebetween; and a controlgate electrode formed on the charge storage layer with an inter-gateinsulating film being interposed therebetween. A threshold voltage ofeach of the memory cell transistors MT0 to MTn changes according to thenumber of electrons storable in the floating gate electrode and thus,can store data according to a difference in the threshold voltage.

Bit lines BL0 to BLm are respectively connected to the drains of (m+1)selection transistors ST1 within one block BLK, and a selection gateline SGD is connected to be common to the gates of the selectiontransistors. In addition, the source of the selection transistor ST1 isconnected to the drain of the memory cell transistor MT0. Similarly, asource line SL is connected to be common to the sources of the (m+1)selection transistors ST2 within one block BLK, and a selection gateline SGS is connected to be common to the gates of the selectiontransistors. In addition, the drain of the selection transistor ST2 isconnected to the source of the memory cell transistor MTn.

Each memory cell is connected not only to the word line but also to thebit line. Each memory cell can be identified by using an address usedfor identifying a word line and an address used for identifying a bitline. As described above, the data of the plurality of memory cells (thememory cell transistors MT) disposed within the same block BLK is erasedaltogether. On the other hand, data is written and read in units ofmemory cell groups MG. One memory cell group MG includes a plurality ofmemory cells connected to one word line.

Each memory cell can perform multi-value storage. In a case where thememory cells are operated in a single level cell (SLC) mode, one memorycell group MG corresponds to one page. On the other hand, in a casewhere the memory cells are operated in a multiple level cell (MLC) mode,one memory cell group MG corresponds to N pages (here, N is a naturalnumber of two or more). In descriptions presented here, the term MLCmode is assumed to include a triple level cell (TLC) mode of N=3.

In a reading operation and a programming operation, one word line isselected according to the physical address, and one memory cell group MGis selected. A switching of the page within this memory cell group MG isexecuted using the physical address.

FIG. 4 is a diagram that illustrates an example of the configuration ofa block of the memory cell array having a three-dimensional structure.FIG. 4 illustrates one block BLK among a plurality of blocks configuringthe memory cell array having the three-dimensional structure. Anotherblock of the memory cell array has a configuration similar to thatillustrated in FIG. 4.

As illustrated in the drawing, the block BLK, for example, includes fourfingers FNG (FNG0 to FNG3). In addition, each finger FNG includes aplurality of NAND strings NS. Each NAND string NS, for example, includeseight memory cell transistors MT (MT0 to MT7) and selection transistorsST1 and ST2. Here, the number of memory cell transistors MT is notlimited to eight. The memory cell transistor MT is arranged between theselection transistors ST1 and ST2 such that the current paths thereofare connected in series. The current path of the memory cell transistorMT7 disposed on one end side of the series connection is connected toone end of the current path of the selection transistor ST1, and thecurrent path of the memory cell transistor MT0 disposed on the other endside is connected to one end of the current path of the selectiontransistor ST2.

The gates of the selection transistors ST1 of the fingers FNG0 to FNG3are commonly connected respectively to selection gate lines SGD0 toSGD3. On the other hand, the gates of the selection transistors ST2 arecommonly connected to the same selection gate line SGS among a pluralityof fingers FNG. In addition, the control gates of the memory celltransistors MT0 to MT7 disposed inside a same block BLK0 are commonlyconnected to word lines WL0 to WL7. In other words, while the word linesWL0 to WL7 and the selection gate lines SGS are commonly connected amongthe plurality of fingers FNG0 to FNG3 disposed inside a same block BLK,the selection gate line SGD is independent for each of the fingers FNG0to FNG3 also inside the same block BLK.

The word lines WL0 to WL7 are connected to the control gate electrodesof the memory cell transistors MT0 to MT7 configuring the NAND stringNS, and the memory cell transistors MTi (i=0 to n) of each NAND stringNS are commonly connected by a same word line WLi (i=0 to n). In otherwords, the control gate electrodes of the memory cell transistors MTidisposed in the same row disposed inside the block BLK are connected toa same word line WLi.

Each memory cell is connected to a word line and a bit line. Each memorycell can be identified by using an address used for identifying a wordline and one of selection gate lines SGD0 to SGD3 and an address usedfor identifying a bit line. As described above, data of memory cells(memory cell transistors MT) disposed inside a same block BLK is erasedtogether. On the other hand, data is read and written in units of memorycell groups MG. One memory cell group MG includes a plurality of memorycells that are connected to one word line WL and belong to one fingerFNG.

In a reading operation and a programming operation, one word line WL andone selection gate line SGD are selected according to the physicaladdress, whereby a memory cell group MG is selected.

FIG. 5 is a cross-sectional view of a partial area of a memory cellarray of a NAND memory having a three-dimensional structure. Asillustrated in FIG. 5, a plurality of NAND strings NS are formed on aP-well region. In other words, on the P-well region, a plurality ofwiring layers 333 functioning as selection gate lines SGS, a pluralityof wiring layers 332 functioning as word lines WL, and a plurality ofwiring layers 331 functioning as selection gate lines SGD are formed.

A memory hole 334 that arrives at the P-well region through such wiringlayers 333, 332, and 331 is formed. On the side face of the memory hole334, a block insulating film 335, a charge storage layer 336, and a gateinsulating film 337 are sequentially formed, and a conductive film 338is embedded inside the memory hole 334. The conductive film 338functions as a current path of the NAND string NS and is an area inwhich a channel is formed when the memory cell transistors MT and theselection transistors ST1 and ST2 operate.

In each NAND string NS, on the P-well region, the selection transistorST2, a plurality of the memory cell transistors MT, and the selectiontransistor ST1 are sequentially stacked. At the upper end of theconductive film 338, a wiring layer functioning as a bit line BL isformed.

In addition, inside the front face of the P-well region, an n+ typeimpurity diffusion layer and a p+ type impurity diffusion layer areformed. On the n+ type impurity diffusion layer, a contact plug 340 isformed, and a wiring layer functioning as a source line SL is formed onthe contact plug 340. In addition, on the p+ type impurity diffusionlayer, a contact plug 339 is formed, and a wiring layer functioning as awell wiring CPWELL is formed on the contact plug 339.

A plurality of the configurations illustrated in FIG. 5 are arranged ina depth direction of the paper face of FIG. 5, and one finger FNG isformed by a set of a plurality of NAND strings aligned in one line inthe depth direction.

Referring back to FIG. 1, the configuration of the memory system 100will be described. In the NAND 10, user data 10 a transmitted from thehost 1, management information 10 b of the memory system 100, firmware(not illustrated in the drawing), and the like are stored. The firmwareoperates a CPU (not illustrated in the drawing) that realizes at least apart of the function of the control unit 20 of the memory controller 5.The firmware may be stored in a ROM not illustrated in the drawing. Themanagement information 10 b includes a logical/physical translationtable, a block management table, and the like.

The memory controller 5 includes: a host interface 3; a memory interface40; a RAM 30; and a control unit 20. In this embodiment, while the RAM30 is provided inside the memory controller 5, the RAM 30 may beprovided outside the memory controller 5. The host I/F 3 outputs acommand, user data (write data), and the like received from the host 1to an internal bus 4. In addition, the host I/F 3 transmits the userdata read from the NAND 10, a response from the control unit 20, and thelike to the host 1. The memory I/F 40 directly controls the NAND 10based on a instruction from the control unit 20.

The RAM 30 is a volatile semiconductor memory that can be accessed at ahigher speed than the NAND 10. The RAM 30 includes a storage area as adata buffer 31. Data received from the host 1 is temporarily stored inthe data buffer 31 before being written into the NAND 10. Data read fromthe NAND 10 is temporarily stored in the data buffer 31 before beingtransmitted to the host 1. The management information 10 b stored in theNAND 10 is loaded into the RAM 30. The management information 30 bloaded into the RAM 30 is backed up into the NAND 10. The RAM 30 alsofunctions as a buffer in which the firmware stored in the NAND 10 isloaded. As the RAM 30, a static random access memory (SRAM) or a dynamicrandom access memory (DRAM) is used.

The control unit 20 includes: a main control unit 21; a block managementunit 22, an ECC unit 23; and a refresh control unit 24. The function ofthe control unit 20 is realized by one or a plurality of CPUs(processors) executing firmware loaded in the RAM 30 and peripheralcircuits thereof. The function of the main control unit 21 is realizedby a CPU and/or hardware that execute firmware. The function of theblock management unit 22 is realized by a CPU and/or hardware thatexecute firmware. The function of the ECC unit 23 is realized by a CPUand/or hardware that execute firmware. The function of the refreshcontrol unit 24 is realized by a CPU and/or hardware that executefirmware.

The main control unit 21 executes a process corresponding to a commandreceived from the host 1 and the like. For example, in a case where awrite request is received from the host 1, the main control unit 21temporarily stores write data in the data buffer 31. When the databuffer 31 is full, for example, the main control unit 21 reads writedata stored in the data buffer and writes the read write data into theNAND 10 through the ECC unit 23 and the memory I/F 40.

On the other hand, in a case where a read request is received from thehost 1, the main control unit 21 instructs the memory I/F 40 to readdata from the NAND 10. The memory I/F 40 temporarily stores the dataread from the NAND 10 in the data buffer 31 through the ECC unit 23. Themain control unit 21 transmits the read data stored in the data buffer31 to the host 1 through the host I/F 3.

The main control unit 21 manages the user data by using alogical/physical translation table that is one of the managementinformation 30 b that is loaded into the RAM 30. In the logical/physicaltranslation table, mapping associating a logical address used by thehost 1 with the physical address of the NAND 10 is registered. As thelogical address, for example, logical block addressing (LBA) is used.The physical address represents a storage position on the NAND 10 atwhich the data is stored.

The block management unit 22 executes the management of blocks includedin the NAND 10 by using the block management table that is one of themanagement information 30 b loaded in the RAM 30. In the blockmanagement table, for example, the following block managementinformation is managed.

The number of times of erasing in units of blocks

Information representing whether a block is an active block or a freeblock

Block address of a bad block

An active block is a block in which valid data is recorded. A free blockis a block in which valid data has not been recorded and is reusableafter erasing the data. The valid data is data associated with a logicaladdress, and invalid data is data not associated with a logical address.When data is written into a free block after erasing data storedtherein, the free block becomes an active block. A bad block is anunusable block that does not normally operate due to various factors.

The ECC unit 23 executes an error correction coding process for datatransmitted from the data buffer 31, thereby generating parity. The ECCunit 23 outputs a code word including data and parity to the memory I/F40. The memory I/F 40 inputs the code word read from the NAND 10 to theECC unit 23. The ECC unit 23 executes an error correction decodingprocess by using the input code word and transmits decoded data to thedata buffer 31.

As a coding system executed by the ECC unit 23, any system may be used.For example, Reed Solomon (RS) coding, Bose Chaudhuri Hocquenghem (BCH)coding, low density parity check (LDPC) coding, or the like may be used.The ECC unit 23 has a function for reporting the degree of errordetected in a decoding process to the main control unit 21. The degreeof error, for example, is the number of error bits, an error bit ratio,or the number of times of executing error correction.

The number of error bits, for example, is the number error bits includedin data of a certain unit. The error bit ratio, for example, is a ratioof error bits included in data of a certain unit. The number of times ofexecuting error correction is the number of times of executing the errorcorrection process until the error correction is successful. The ECCunit 23 includes a first-level ECC unit and a second-level ECC unit thatare at least two ECC processing units having mutually-different errorcorrection capabilities. The error correction capability of thesecond-level ECC unit is higher than that of the first-level ECC unit.The error correction capability, for example, can be changed by changingthe data size configuring a code word and/or the coding system. In acase where an error correction fails in the first-level ECC unit, anerror correction is made by the second-level ECC unit. The ECC unit 23reports one as the number of times of executing error correction in acase where an error correction is successful in the first-level ECC unitand reports two as the number of times of executing error correction ina case where an error correction is successful in the second-level ECCunit.

FIG. 6 illustrates a distribution of threshold voltages relating tofour-value data (data “11”, “01”, “00”, and “11”) stored in a memorycell of a four-value NAND cell (2-bit cell) flash memory. The horizontalaxis represents the threshold voltage. The vertical axis represents thenumber of memory cells. Here, when data is denoted as “xy”, x representsupper-page data and y represents lower-page data. In descriptionpresented hereinafter, a mountain of a distribution disposed on the leftside on which the threshold voltage is low toward a mountain of adistribution disposed on the right side on which the threshold voltageis high in FIG. 6 will be referred to as mountains E, A, B, and C. Inthe case illustrated in FIG. 6, the threshold distribution of the data“11” corresponds to the mountain E, the threshold distribution of thedata “01” corresponds to the mountain A, the threshold distribution ofthe data “00” corresponds to the mountain B, and the thresholddistribution of the data “10” corresponds to the mountain C. Thecorrespondence between each mountain and the four-value data isarbitrary, and, for example, the mountain E, the mountain A, themountain B, and the mountain C may be respectively in correspondencewith the data “11”, “10”, “00”, and “01”.

Next, a programming process of four-value data in the NAND 10 will bedescribed. The mountain E corresponds to the threshold distribution ofthe memory cell after block erasing, and the data “11” is assignedthereto. In accordance with the value of the lower page data, in otherwords, a programming voltage Vprg is applied to a selected word lineconnected to a memory cell of which the value of the lower page data is“0”, and, for example, 0 V is applied to a selected bit line connectedto the same memory cell. More specifically, the sense amplifier 15 setsthe electric potential of a bit line selected by the column decoder 17to 0 V. The row decoder 14 applies the programming voltage (programmingpulse) Vprg to the selected word line. Then, the threshold voltage ofthe floating gate of a memory cell located at an intersection of theselected bit line and the selected word line rises. The sense amplifier15 checks whether or not the threshold voltage arrives at a verifyvoltage according to data stored in the page buffer 16 every time whenthe programming pulse is applied. Until the threshold voltage arrives atthe verify voltage according to the data, the sense amplifier 15continues to apply the programming pulse to the row decoder 14. In thisway, the programming operation is repeated until the threshold voltageof the memory cell of which the value of the lower page data is “0”becomes a certain verify voltage or higher.

Thereafter, for a memory cell of the data “11”, a rise in the thresholdvoltage Vth of the memory cell is prevented, whereby application of ahigh voltage to the memory cell is prevented. For example, for thememory cell of the data “11”, when a programming operation is executedfor memory cells of the other data “01”, “00”, and “10”, a writeinhibition voltage Vdd is applied to a bit line connected to the memorycell of the data “11” is applied, whereby the selection transistor ST1is Off.

For a memory cell of the data “01”, a certain verify electric potentialVAV is set, and the programming operation is repeated until thethreshold voltage of the memory cell becomes the verify voltage VAV orhigher.

For a memory cell of data “00”, a certain verify electric potential VBVis set, and the programming operation is repeated until the thresholdvoltage of the memory cell becomes the verify voltage VBV or higher. Fora memory cell of data “10”, a certain verify electric potential VCV isset, and the programming operation is repeated until the thresholdvoltage of the memory cell becomes the verify voltage VCV or higher.Also in a multi-bit storage system of three or more bits, only anoperation of dividing the threshold voltage distribution into eight ormore kinds according to data of the upper page is further added, andthus, the basic operation is similar to that described above.

Next, a process of reading four-value data in the NAND 10 will bedescribed. At the time of reading data, the sense amplifier 15pre-charges a bit line BL with power source electric potential Vcc, andthe row decoder 14 sequentially applies read voltages VAr, VBr, VCr setbetween mountains to selected word lines WL. In addition, the rowdecoder 14 applies transmission electric potential to word lines WL thatare not selected and sets memory cells belonging to the word lines WLthat are not selected to be in a conductive state. The sense amplifier15 determines data stored in a target memory cell by detecting whetherelectric charge accumulated through the pre-charging process flows outto a source line SL when a certain read electric potential is applied.

For example, as illustrated in FIG. 6, the read voltage VAr is setbetween the mountain E and the mountain A, the read voltage VBr is setbetween the mountain A and the mountain B, and the read voltage VCr isset between the mountain B and the mountain C.

In a case where the reading target is a lower page, the read voltage VBris used for the determination. When a current is detected at the sourceline SL in a case where the read voltage VBr is applied, the senseamplifier 15 determines that data “1” is stored in the target memorycell. On the other hand, when a current is not detected at the sourceline SL in a case where the read voltage VBr is applied, the senseamplifier 15 determines that data “0” is stored in the target memorycell.

In a case where the reading target is an upper page, the read voltageVAr and the read voltage VCr are used for the determination. When acurrent is detected in a case where the read voltage VAr is applied, orwhen a current is not detected in a case where any one of the readvoltage VAr and the read voltage VCr is applied, the sense amplifier 15determines that data “1” is stored in the target memory cell. On theother hand, when a current is not detected in a case where the readvoltage VAr is applied, and a current is detected in a case where theread voltage VCr is applied, the sense amplifier 15 determines that data“0” is stored in the target memory cell.

Meanwhile, in the NAND 10, there are error factors such as a dataretention error, a reading disturbing error, and a programmingdisturbing defect. According to such error factors, the amount ofelectric charge in the floating gate changes. As a result, the thresholddistributions of the memory cells change as denoted by broken lines inFIG. 7. When the distributions change as such, for the set read voltagesVAr, VBr, and VCr, the number of cells of which data cannot be correctlyidentified increases. Hereinafter, a memory cell of which the thresholdvoltage is out of an allowed range due to the error factors describedabove and of which data cannot be correctly identified will be referredto as an error cell. Memory cells of which the threshold voltage are outof the allowed range, for example, are a memory cell having a thresholdvoltage lower than the read voltage VCr among memory cells in which data“10” is written, a memory cell having a threshold voltage lower than theread voltage VBr among memory cells in which data “00” is written, and amemory cell having a threshold voltage lower than the read voltage VAramong memory cells in which data “01” is written.

The number of such error cells increases according to an elapse of timeas the whole NAND 10. While the number of error cells is small, data canbe restored by an error correction process executed by the ECC unit 23.However, when the number of error cells increases to some degree ormore, in the decoding process executed by the ECC unit 23, write datacannot be restored. When the error correction cannot be made by the ECCunit 23, the memory system 100 loses the write data.

For this reason, in the memory system 100, for example, by executing arefreshing process in which data stored in a block, of which the numberof error bits exceeds a certain threshold in the error correctionprocess executed by the ECC unit 23, is written into another block, thenumber of error bits of each block occurring in the error correctionprocess is suppressed to be a constant number or less. Hereinafter,refreshing for rewriting data of a refreshing source block into arefreshing destination block will be referred to as normal refreshing.However, this normal refreshing process accompanies an erasing process,and, accordingly, when the normal refreshing process is repeated severaltimes, damage given to the NAND 10 is accumulated.

Thus, in the embodiment, in addition to the normal refreshing describedabove, overwrite refreshing is executed. In the overwrite refreshing,the error cell is specified, and the same data is overwritten into thespecified error cell, in other words, reprogramming is executed. Theerror cell may be specified by either the NAND control unit 12 of theNAND 10 or the control unit 20 of the memory controller 5. In a casewhere the error cell is specified by the control unit 20, there is amethod using the error correction process executed by the ECC unit 23 ordistribution reading. The method of specifying the error cell will bedescribed later. The overwrite refreshing is executed in a certainprocessing unit (for example, in units of blocks, in units of memorycell groups, or in units of pages). In the overwrite refreshing, sincethe overwrite refreshing is executed by only a programming process,damage in the NAND 10 is less than that of the normal refreshing by anamount corresponding to no accompaniment of an erasing process. For thisreason, compared to a technique executing only the normal refreshing,the life of the NAND 10 can be lengthened. Particularly, in a situationin which the overwriting amount of refreshing is dominant, the damagegiven to the NAND 10 in the refreshing process can be decreased. Inaddition, in the overwrite refreshing, only a programming operation isexecuted without accompanying an erasing process, and thus, the numberof times of programming is less than that of the normal refreshing, andaccordingly, compared to the normal refreshing, the refreshing can beexecuted with low power consumption and at high speed.

In FIG. 1, the refresh control unit 24 executes the normal refreshingand the overwrite refreshing. The normal refreshing is executed when anormal refreshing execution condition is satisfied. The overwriterefreshing is executed when an overwrite refreshing execution conditionis satisfied. While the overwrite refreshing, as described above, can beexecuted in a page unit, a memory cell group unit, or a block unit,here, a case will be described in which the overwrite refreshing isexecuted in units of blocks.

The refresh control unit 24 manages a parameter used for determiningwhether or not normal refreshing is executed and a parameter used fordetermining whether or not overwrite refreshing is executed. Theparameter used for determining whether or not normal refreshing isexecuted and the parameter used for determining whether or not overwriterefreshing is executed may be different from each other or may be thesame. Hereinafter, the parameter used for determining whether or notnormal refreshing is executed and the parameter used for determiningwhether or not overwrite refreshing is executed will be collectivelyreferred to as refreshing parameters. As the refreshing parameters, forexample, numerical values representing the degrees of error of a blocksuch as the number of error bits of the block, an error bit rate of theblock, and the number of times of executing the error correction of theblock are used. In addition, as the refreshing parameter, the number oftimes of executing erasing data of a block, the number of times ofreading data of a block, or the number of times of writing data into theblock is used. Furthermore, as the refreshing parameter, a time intervalor time for refreshing is used. The refresh control unit 24 candesignate a time interval or time for refreshing. In addition, as therefreshing parameter for the normal refreshing, the number of times ofexecuting the overwrite refreshing for a block can be used.

A case will be described in which the number of error bits of a block isused as the refreshing parameter. The number of error bits of a block iscalculated based on the number of error bits of one or a plurality ofpages included in the block. The number of error bits of a page is thenumber of error bits occurring in data written into the page and isnotified from the ECC unit 23. In order to calculate the number of errorbits of a block, the number of error bits of all the pages included inthe block may be acquired. In addition, the number of error bits of ablock may be calculated based on the number of error bits of specifiedone or a plurality of pages selected in advance as sample targets. Forexample, the numbers of error bits of a plurality of pages that aresample targets are acquired, and an average value or a maximum valuethereof is set as the number of error bits of the block.

A case will be described in which the number of times of reading data ofa block is used as the refreshing parameter. The number of times ofreading data of a block is calculated based on the number of times ofreading data of one or a plurality of pages included in the block. Inorder to calculate the number of times of reading data of a block, thenumber of times of reading all the pages included in the block may beacquired. In addition, the number of times of reading data of a blockmay be calculated based on the number of times of reading specified oneor a plurality of pages selected in advance as sample targets. Forexample, the numbers of times of reading data of a plurality of pagesthat are sample targets are acquired, and an average value or a maximumvalue thereof is set as the number of times of reading data of theblock.

FIG. 8 is a flowchart that illustrates the refreshing process executedby the refresh control unit 24. In the case illustrated in FIG. 8, asthe parameter used for determining whether or not the normal refreshingand the overwrite refreshing are executed, the number of error bits ofthe block is used. The refresh control unit 24 calculates the number oferror bits of a block based on information notified from the ECC unit 23at the time of executing a reading process or patrol reading based on aread command transmitted from the host 1. The patrol reading is aprocess in which data stored in the NAND 10 is read for each certainunit, and the read data is tested based on a result of the errorcorrection executed by the ECC unit 23 for detecting a block in whichthe number of errors increases. In this test process, the number oferror bits of read data is compared with a threshold, and data of whichthe number of error bits exceeds the threshold is set as a refreshingtarget. For example, when error correction cannot be executed by thefirst-level ECC unit, the data is set as a refreshing target. In thepatrol reading, during one certain cycle determined in advance, data isread from all the area of the NAND 10 and is tested.

The refresh control unit 24 compares the calculated number of error bitsof the block with a threshold Th1 (Step S10) and, in a case where thenumber of error bits is the threshold Th1 or more (Step S10: Yes),executes normal refreshing for this block (Step S20). In other words,data stored in the block is moved to another erased block. The refreshcontrol unit 24 compares the number of error bits with a threshold Th2less than the threshold Th1 (Step S30) in a case where the number oferror bits is less than the threshold Th1 (Step S10: No) and executesthe overwrite refreshing for the block (Step S40) in a case where thenumber of error bits is the threshold Th2 or more (Step S10: Yes). In acase where the number of error bits is less than the threshold Th2 (StepS30: No), refreshing is not executed for the block.

The refreshing process that is executed by the refresh control unit 24does not need to follow the exact same procedures as the stepsillustrated in FIG. 8, as long as: (1) an overwrite refreshing isexecuted for a block in a case where the calculated number of error bitsof that block is equal to or greater than the threshold Th2 and lessthan the threshold Th1; and (2) a normal refreshing is executed for ablock in a case where the number of error bits is equal to or greaterthan the threshold Th1.

FIG. 9 is a flowchart that illustrates another example of the refreshingprocess executed by the refresh control unit 24. The refreshing processshown in FIG. 9 is a variation of the refreshing process shown in FIG.8. The refresh control unit 24 compares the calculated number of errorbits of the block with the threshold Th2 (Step S50) and, in a case wherethe number of error bits is less than the threshold Th1 (Step S50: No),refreshing is not executed for the block. In a case where the number oferror bits is equal to or more than the threshold Th2 (Step S50: Yes),the refresh control unit 24 compares the number of error bits with thethreshold Th1 that is more than the threshold Th2 (Step S60). In a casewhere the number of error bits is equal to or more than the thresholdTh1 (Step S60: Yes), the refresh control unit 24 executes the normalrefreshing for this block (Step S70). In a case where the number oferror bits is less than the threshold Th1 (Step S60: No), the refreshcontrol unit 24 executes the overwrite refreshing for the block (StepS80).

FIG. 10 is a diagram that illustrates a relation between a change in thenumber of error bits of a certain block and a refreshing process. Asolid line represents a change in the number of error bits of a casewhere a technique according to this embodiment is used. A broken linerepresents a change in the number of error bits of a case where atechnique according to a comparative example is used. In a memory systemof the comparative example, only the normal refreshing is executed. Inthe memory system of the comparative example, the normal refreshing isexecuted when the number of error bits is the threshold Th2 or more. Incontrast to this, the memory system according to this embodimentexecutes the overwrite refreshing when the number of error bits is thethreshold Th2 or more and less than the threshold Th1 and executes thenormal refreshing when the number of error bits is the threshold Th1. Inthe case illustrated in FIG. 10, the memory system of the comparativeexample executes the normal refreshing three times. In this embodiment,the overwrite refreshing is executed twice, and the normal refreshing isexecuted once, and thus, the number of times of executing the normalrefreshing is decreased.

In a case where the overwrite refreshing is executed in units of memorycell groups described above, the refresh control unit 24 calculates therefreshing parameter in units of memory cell groups and, when thecalculated value exceeds a threshold used for the overwrite refreshing,executes the overwrite refreshing in units of memory cell groups. On theother hand, in a case where the overwrite refreshing is executed inunits of pages, the refresh control unit 24 calculates the refreshingparameter in units of pages and, when the calculated value exceeds thethreshold used for the overwrite refreshing, executes the overwriterefreshing in units of pages.

Next, the overwrite refreshing will be described in detail. When theoverwrite refreshing is executed, there are a first case in which theNAND 10 has an overwrite refreshing function and a second case in whichthe NAND 10 does not have an overwrite refreshing function. Theoperation of the refresh control unit 24 is different between the firstcase and the second case.

First, the first case will be described. In a case where the condition(the number of error bits is the threshold Th2 or more) of Step S30illustrated in FIG. 8 is satisfied, the refresh control unit 24 outputsan overwrite refreshing command to the NAND 10 through the memory I/F 40in order to execute the overwrite refreshing of a block for which thecondition is satisfied. The overwrite refreshing command includes: acommand XXh formed by an arbitrary code representing overwriterefreshing; an address ADD of the block for which the condition of StepS30 is satisfied, and data DD stored in the block. The data stored inthe block is data of all the pages included in the block and is a codeword for which the error correction is executed by the ECC unit 23.

FIG. 11 is a flowchart that illustrates an example of the processexecuted by the NAND control unit 12 of the NAND 10. The NAND controlunit 12 of the NAND 10 receives an overwrite refreshing commandtransmitted from the memory I/F 40 through the NAND I/O interface 11(S100). The NAND control unit 12 recognizes the execution of overwriterefreshing based on the command XXh included in the received overwriterefreshing command and specifies a target area for which the overwriterefreshing is executed based on the address ADD of the block.

The NAND control unit 12 executes a pre-verify process for the specifiedtarget area (Step S110). The pre-verify process is a process in which anerror cell inside a specified area is specified. The NAND control unit12 executes the pre-verify process, thereby specifying one or aplurality of error cells inside the specified target area.

Next, the NAND control unit 12 executes the overwrite refreshing inwhich reprogramming is executed for the specified error cell, andreprogramming is not executed for normal cells that are cells other thanthe error cell inside the block based on the received data DD (StepS120). For example, in the case of the four-value memory cellillustrated in FIG. 7, to an error cell belonging to the mountain A,word line electric potential used for the mountain A is set, verifyelectric potential VAV used for the mountain A is set, and theprogramming operation is executed. In this programming operation, avoltage corresponding to one pulse or several pulses is applied to amemory cell. A voltage is not applied to normal cells belonging to themountain A. Also for memory cells belonging to the mountain B and themountain C, a similar reprogramming operation is executed. In this way,only error cells are reprogrammed, and the threshold voltage of theerror cells can be raised to be in an allowed range. When such overwriterefreshing ends, the NAND control unit 12 transmits the end of theoverwrite refreshing to the refresh control unit 24 of the memorycontroller 5 (Step S130).

Next, the second case will be described. FIG. 12 is a flowchart thatillustrates an example of the operation of the memory controller 5 thatis executed in case of the second case. In a case where the condition(the number of error bits is the threshold Th2 or more) of Step S30illustrated in FIG. 8 is satisfied, the refresh control unit 24specifies an error cell for which the condition is satisfied inside theblock (Step S200). As a process for the specifying of an error cell, forexample, first and second methods may be used. The first method is amethod using an error correction process, and an error cellcorresponding to error bit data is specified, for example, using a BCHcode. The second technique is a method using distribution reading. In adistribution reading operation, for example, while a plurality of kindsof read voltages are sequentially applied to a selected word line, athreshold voltage is determined for each of a plurality of memory cellsconnected to the word line, and results of the determinations arecounted, whereby a threshold distribution of memory cells is acquired.Thus, according to the distribution reading, an error cell of which thethreshold distribution is out of the allowed range can be specified.

Next, the refresh control unit 24 outputs a programming commandincluding a normal programming command to the NAND 10 so as to executeoverwrite refreshing of a block for which the condition of Step S30illustrated in FIG. 8 is satisfied (S210). This programming command, inaddition to a normal programming command, includes an address and dataused for reprogramming an error cell inside a target block and used fornot reprogramming normal cells inside the target block. Error correctionis executed by the ECC unit 23 for the data used for reprogramming anerror cell. Data used for not reprogramming a normal cell, for example,is data (“11” in the case illustrated in FIG. 6) corresponding to anerase level (the mountain E illustrated in FIG. 6).

When the programming command is received, the NAND control unit 12 ofthe NAND 10 executes a programming process such that reprogramming isexecuted for an error cell inside the block, and reprogramming is notexecuted for the other normal cells inside the block based on the dataand the address that have been received. In this way, only the errorcell is reprogrammed, and the threshold voltage of the error cell can beraised to be within an allowed range. In addition, at the time ofreprogramming the error cell, an electric field corresponding to onepulse or several pulses is preferably applied to the memory cell.

In the description presented above, while the overwrite refreshing isexecuted in units of blocks, the overwrite refreshing may be executed inunits of memory cell groups or in unit of pages.

In this way, according to the first embodiment, since the normalrefreshing and the overwrite refreshing are used together, the number oftimes of executing the normal refreshing accompanying an erasingoperation can be decreased, and damage given to the NAND is decreased,whereby the life of the NAND can be lengthened. Particularly, for a NANDhaving a three-dimensional structure, in a case where the Yupin effectis small, a sufficient effect can be expected also in the overwriterefreshing.

Second Embodiment

According to a second embodiment, for each of a plurality of mountainsconfiguring a threshold distribution, a correction amount for athreshold voltage at the time of overwrite refreshing is configured tobe changeable. As illustrated in FIG. 7, in the case of the four-valuememory cell, there are four mountains (mountains E, A, B, and C). Thetendency of a change (corresponding to a broken line illustrated in FIG.7) in the distribution of each mountain that is caused by a dataretention error, a reading disturbing error, a programming disturbingdefect, and the like is acquired through experiments. For example, it isassumed that the amount of change of the mountain C>the amount of changeof the mountain B>the amount of change of the mountain A. In such acase, the overwrite refreshing is executed by using correction amountssatisfying a relation of “the correction amount of the threshold voltageof the memory cell belonging to the mountain C>the correction amount ofthe threshold voltage of the memory cell belonging to the mountain B>thecorrection amount of the threshold voltage of the memory cell belongingto the mountain A”. For example, a tendency of the change in thedistribution of each mountain accompanied with a change in the number oftimes of reading data (or the number of times of erasing data) isacquired through experiments, and a correction amount for the thresholdvoltage of each mountain according to the number of times of readingdata (or the number of times of erasing data) is set. Then, when theoverwrite refreshing is executed, a mountain to which the memory cellthat is an overwrite refreshing target belongs and the number of timesof reading data of the memory cell that is the overwrite refreshingtarget are acquired, and a correction amount corresponding to themountain and the number of times of reading data that have been acquiredis used.

In this way, according to the second embodiment, the overwriterefreshing is executed by using the first correction amount when thememory cell is programmed using the threshold voltage belonging to themountain A, the overwrite refreshing is executed by using the secondcorrection amount when the memory cell is programmed using the thresholdvoltage belonging to the mountain B, and the overwrite refreshing isexecuted by using the third correction amount when the memory cell isprogrammed using the threshold voltage belonging to the mountain C,whereby an error cell can be restored into a normal cell with highaccuracy.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A memory system comprising: a nonvolatile memoryincluding a plurality of groups, the group including a plurality ofmemory cells; and a controller configured to output a first command tothe nonvolatile memory to execute first refreshing, the first refreshingincluding reprogramming at least one second memory cell among aplurality of first memory cells, each of the plurality of first memorycells having been programmed, the number of programming pulses forreprogramming the second memory cell being less than a number ofprogramming pulses for programming the first memory cells.
 2. The memorysystem according to claim 1, wherein the first refreshing includes notreprogramming a plurality of third memory cells that are different fromthe second memory cell among the first memory cells.
 3. The memorysystem according to claim 1, wherein the number of programming pulsesfor reprogramming the second memory cell is one.
 4. The memory systemaccording to claim 1, wherein the first refreshing includes notverifying voltage of the reprogrammed second memory cell.
 5. The memorysystem according to claim 1, wherein, when the second memory cell hasbeen programmed using a threshold voltage belonging to a firstdistribution, the second memory cell is reprogrammed using a firstcorrection amount, and when the second memory cell has been programmedusing a threshold voltage belonging to a second distribution, the secondmemory cell is reprogrammed using a second correction amount.
 6. Thememory system according to claim 1, wherein the nonvolatile memory is aflash memory having a three-dimensional structure.
 7. The memory systemaccording to claim 1, wherein, the first command specifies firstinformation that includes an address of the first memory cells andsecond information that includes data for programming the first memorycells, and the nonvolatile memory further includes a control circuitconfigured to: when the first command is received, specify positions ofthe first memory cells inside the nonvolatile memory based on the firstinformation; specify the second memory cell among the specified firstmemory cells; and execute the first refreshing for the specified secondmemory cell by using the second information.
 8. The memory systemaccording to claim 1, wherein: the controller is further configured tooutput the first command in a case where a first condition as to a firstgroup is satisfied; and the plurality of first memory cells are includedin the first group.
 9. The memory system according to claim 8, whereineach of the group is a unit for programming of data.
 10. The memorysystem according to claim 8, wherein each of the group is a unit that issmaller than a unit for erasing of data.
 11. The memory system accordingto claim 8, wherein the first condition is that a number of error bitsis larger than a first threshold.
 12. The memory system according toclaim 8, wherein the first condition is that a number of times ofexecuting error correction is larger than a first threshold.
 13. Thememory system according to claim 8, wherein the first condition is thata time from the previous first refreshing is longer than a firstthreshold.
 14. The memory system according to claim 2, wherein, thecontroller is further configured to specify the second memory cell amongthe first memory cells, and the first command includes data and anaddress for reprogramming the specified second memory cell and notreprogramming the third memory cells.
 15. The memory system according toclaim 8, wherein, the controller is further configured to, in a casewhere a second condition as to the first group is satisfied, executesecond refreshing, the second refreshing including moving data in thefirst group to the second group that is different from the first group.16. The memory system according to claim 15, wherein, the firstcondition is that a number of error bits is larger than a firstthreshold and less than or equal to a second threshold, the secondcondition is that the number of error bits is larger than a secondthreshold, and the second threshold is larger than the first threshold.17. The memory system according to claim 15, wherein, the firstcondition is that a number of times of executing error correction islarger than a first threshold and less than or equal to a secondthreshold, the second condition is that the number of times of executingerror correction is larger than a second threshold, and the secondthreshold is larger than the first threshold.
 18. The memory systemaccording to claim 15, wherein, the first condition is that a number oferror bits is larger than a first threshold, and the second condition isthat a number of times of executing the first refreshing is larger thana second threshold.
 19. A memory system comprising: a nonvolatile memoryincluding a plurality of memory cells, each of the plurality of memorycells being to store a substance to store data; and a controllerconfigured to output a first command to the nonvolatile memory toexecute first refreshing, the first refreshing including reprogrammingat least one second memory cell among a plurality of first memory cells,each of the plurality of first memory cells having been programmed, theamount of the substance for reprogramming the second memory cell beingless than the amount of the substance for programming the first memorycells.
 20. The memory system according to claim 19, wherein thesubstance is electron.